<template>
  <div class="team-yq" @click="toNews(newsInfo.aid)">
    <div class="fx">
      <div v-if="newsInfo.piclink">
        <van-image width="60" height="60" :src="newsInfo.piclink" radius="3px" />
      </div>
      <div class="fx im-cust-com">
        <div class="team-yq-text">
          {{ newsInfo.title }}
        </div>
        <div class="tr">
          <el-button size="mini" color="linear-gradient(to right, #f19800, #ff5407)" type="primary" round>查看新闻</el-button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { Image } from "vant";
export default {
  name: "team-yq",
  props: {
    newsInfo: {
      type: Object,
      default: () => {},
    },
  },
  data() {
    return {};
  },
  components: {
    [Image.name]: Image,
  },
  created() {},
  mounted() {},
  methods: {
    toNews(id) {
      let routeData = this.$router.resolve({
        path: "/pages/news/newsdetail/newsdetail",
        query: { news_id: id },
      });
      // window.open('http://192.168.50.133:82'+routeData.href, "_blank");
      window.open(this.$store.state.phoneAddress + routeData.href, "_blank");
    },
  },
};
</script>
<style lang="less" scoped>
.team-yq {
  font-size: 14px;
  line-height: 1.2;
  min-width: 230px;
  > p {
    font-size: 16px;
    color: #333;
    text-align: left;
    margin-bottom: 6px;
  }
  > div {
    align-items: flex-start;
    text-align: left;
    color: #757272;
    .team-yq-text {
      max-width: 200px;
      margin-left: 10px;
    }
  }
}
.im-cust-com {
  flex-direction: column;
  justify-content: space-between;
  min-height: 60px;
  .tr {
    width: 100%;
  }
}
</style>
